package cn.gson.springboot.model.pjos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "refundinfo", schema = "springboot", catalog = "")
public class RefundinfoEntity {
    private int refundId;
    private Integer refundOrderid;
    private Integer refundType;
    private Timestamp refundTime;
    private Integer refundCustomerid;
    private Integer refundUserid;
    private Integer refundContractid;
    private Integer refundState;
    private BigDecimal refundAmount;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    @Column(name = "refund_id", nullable = false)
    public int getRefundId() {
        return refundId;
    }

    public void setRefundId(int refundId) {
        this.refundId = refundId;
    }

    @Basic
    @Column(name = "refund_orderid", nullable = true)
    public Integer getRefundOrderid() {
        return refundOrderid;
    }

    public void setRefundOrderid(Integer refundOrderid) {
        this.refundOrderid = refundOrderid;
    }

    @Basic
    @Column(name = "refund_type", nullable = true)
    public Integer getRefundType() {
        return refundType;
    }

    public void setRefundType(Integer refundType) {
        this.refundType = refundType;
    }

    @Basic
    @Column(name = "refund_time", nullable = true)
    public Timestamp getRefundTime() {
        return refundTime;
    }

    public void setRefundTime(Timestamp refundTime) {
        this.refundTime = refundTime;
    }

    @Basic
    @Column(name = "refund_customerid", nullable = true)
    public Integer getRefundCustomerid() {
        return refundCustomerid;
    }

    public void setRefundCustomerid(Integer refundCustomerid) {
        this.refundCustomerid = refundCustomerid;
    }

    @Basic
    @Column(name = "refund_userid", nullable = true)
    public Integer getRefundUserid() {
        return refundUserid;
    }

    public void setRefundUserid(Integer refundUserid) {
        this.refundUserid = refundUserid;
    }

    @Basic
    @Column(name = "refund_contractid", nullable = true)
    public Integer getRefundContractid() {
        return refundContractid;
    }

    public void setRefundContractid(Integer refundContractid) {
        this.refundContractid = refundContractid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RefundinfoEntity that = (RefundinfoEntity) o;
        return refundId == that.refundId &&
                Objects.equals(refundOrderid, that.refundOrderid) &&
                Objects.equals(refundType, that.refundType) &&
                Objects.equals(refundTime, that.refundTime) &&
                Objects.equals(refundCustomerid, that.refundCustomerid) &&
                Objects.equals(refundUserid, that.refundUserid) &&
                Objects.equals(refundContractid, that.refundContractid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(refundId, refundOrderid, refundType, refundTime, refundCustomerid, refundUserid, refundContractid);
    }

    @Basic
    @Column(name = "refund_state", nullable = true)
    public Integer getRefundState() {
        return refundState;
    }

    public void setRefundState(Integer refundState) {
        this.refundState = refundState;
    }



    @Basic
    @Column(name = "refund_amount", nullable = true)
    public BigDecimal getRefundAmount() {
        return refundAmount;
    }

    public void setRefundAmount(BigDecimal refundAmount) {
        this.refundAmount = refundAmount;
    }
}
